﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ComeSeeThis_MVC2.Models.Vehicle>>" %>

<%@ Import Namespace="ComeSeeThis_MVC2.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Vehicles
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyTagContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
     <% Html.RenderPartial("SubMenu"); %>
   <h2>
        Vehicles</h2>
    <% using (Ajax.BeginForm("IndexVehicleList", new AjaxOptions { UpdateTargetId = "VehicleList" }))
       {%>
    <%
        var companies = (SelectList)ViewData["Companies"];%>
    <%:Html.DropDownList("CompanyId", companies)%>
    <input type="submit" value="Search" />
    <%
        }%>

    <div id="VehicleList">
        <%
            Html.RenderPartial("VehicleList");%>
    </div>
    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
</asp:Content>
